package com.thingcom.chinamobile.controller;

import com.thingcom.base.util.R;
import com.thingcom.chinamobile.dto.DeviceDto;
import com.thingcom.chinamobile.service.DeviceManageService;
import com.thingcom.chinamobile.service.DeviceStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName DeviceController
 * @Description TODO
 * @Author zhou tao
 * @Date 2019/12/18 9:23
 * @Version 1.0
 **/
@RestController
@RequestMapping("/device")
public class DeviceController {

	@Autowired
	private DeviceManageService deviceManageService;

	@PutMapping
	public R updateDevice(@RequestBody DeviceDto deviceDto) {
		deviceManageService.updateDevice(deviceDto);
		return R.ok();
	}
}
